<template>
	<view class="pl-30 pr-30">
		<u-parse :content="text" noData=" "></u-parse>
	</view>
</template>

<script>
	export default {
		data () {
			return {
				text:'',
				type:'user'
			}
		},
		onLoad(opt) {
			this.type = opt.type
			if(opt.type === 'user'){
				uni.setNavigationBarTitle({
					title:'用户服务协议'
				})
			}else if(opt.type === 'privacy'){
				uni.setNavigationBarTitle({
					title:'隐私政策'
				})
			}
			this.getSystemInfo()
		},
		methods: {
			getSystemInfo(){
				this.$http.GetSystemInfo().then(res=>{
					if(this.type === 'user'){
						this.text = res.data.useragreement
					}else if(this.type === 'privacy'){
						this.text = res.data.privacy
					}
				})
			}
		}
	}
</script>

<style>
</style>